<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../../../print.css" type="text/css" media="print">
<meta content="AbstractSortedCollection,org.as3commons.collections.framework.core.AbstractSortedCollection,_comparator,_root,_size,comparator,first,last,size,addNode,clear,firstEqualNode,has,hasEqual,higherNode,iterator,lesserNode,mostLeftNode_internal,mostRightNode_internal,nextNode_internal,previousNode_internal,remove,removeFirst,removeLast,removeNode,removeNode_internal,rotate,toArray" name="keywords">
<title>org.as3commons.collections.framework.core.AbstractSortedCollection</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'AbstractSortedCollection - AS3Commons Collections 1.3.2';
				var baseRef = '../../../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">AS3Commons Collections 1.3.2</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../../../all-classes.html')" href="../../../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../../all-classes.html')" href="../../../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../../index-list.html')" href="../../../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../../../index.html?org/as3commons/collections/framework/core/AbstractSortedCollection.html&amp;org/as3commons/collections/framework/core/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;AbstractSortedCollection</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class AbstractSortedCollection"); titleBar_setSubNav(false,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">org.as3commons.collections.framework.core</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class AbstractSortedCollection</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Implements</td><td><a href="../ISortOrder.html">ISortOrder</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Subclasses</td><td><a href="../core/AbstractSortedDuplicatesCollection.html">AbstractSortedDuplicatesCollection</a>, <a href="../../../collections/SortedSet.html">SortedSet</a></td>
</tr>
</table>
<p></p>
  Abstract sorted tree based collection implementation.
  
  <p>This implementation is based on the treap data structure which is here modified to
  enable duplicate items wich includes multiple equal items.</p>
  
  <p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#comparator">comparator</a> : <a href="../../framework/IComparator.html">IComparator</a>
<div class="summaryTableDescription">
   
   Returns or sets the initial comparator of the collection.</div>
</td><td class="summaryTableOwnerCol">AbstractSortedCollection</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#first">first</a> : *<div class="summaryTableDescription">[read-only]
   
   The first item or <code>undefined</code> if the collection is empty.</div>
</td><td class="summaryTableOwnerCol">AbstractSortedCollection</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#last">last</a> : *<div class="summaryTableDescription">[read-only]
   
   The last item or <code>undefined</code> if the collection is empty.</div>
</td><td class="summaryTableOwnerCol">AbstractSortedCollection</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#size">size</a> : uint<div class="summaryTableDescription">[read-only]
   
   The number of items contained by the collection.</div>
</td><td class="summaryTableOwnerCol">AbstractSortedCollection</td>
</tr>
</table>
</div>
<a name="protectedPropertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Protected Properties</div>
<table id="summaryTableProtectedProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#_comparator">_comparator</a> : <a href="../../framework/IComparator.html">IComparator</a>
<div class="summaryTableDescription">
   The sort criterion.</div>
</td><td class="summaryTableOwnerCol">AbstractSortedCollection</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#_root">_root</a> : <a href="../core/SortedNode.html">SortedNode</a>
<div class="summaryTableDescription">
   The root node.</div>
</td><td class="summaryTableOwnerCol">AbstractSortedCollection</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#_size">_size</a> : uint = 0<div class="summaryTableDescription">
   The size of the collection.</div>
</td><td class="summaryTableOwnerCol">AbstractSortedCollection</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#AbstractSortedCollection()">AbstractSortedCollection</a>(comparator:<a href="../IComparator.html">IComparator</a> = null)</div>
<div class="summaryTableDescription">
   AbstractSortedCollection constructor.</div>
</td><td class="summaryTableOwnerCol">AbstractSortedCollection</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#clear()">clear</a>():Boolean</div>
<div class="summaryTableDescription">
   
   Removes all items from the collection.</div>
</td><td class="summaryTableOwnerCol">AbstractSortedCollection</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#has()">has</a>(item:*):Boolean</div>
<div class="summaryTableDescription">
   
   Tests if an item is contained by the collection.</div>
</td><td class="summaryTableOwnerCol">AbstractSortedCollection</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#hasEqual()">hasEqual</a>(item:*):Boolean</div>
<div class="summaryTableDescription">
   
   Tests if the collection contains an item that is equal to the given item.</div>
</td><td class="summaryTableOwnerCol">AbstractSortedCollection</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#iterator()">iterator</a>(cursor:*):<a href="../../framework/IIterator.html">IIterator</a>
</div>
<div class="summaryTableDescription">
   
   Returns an iterator over the iterable data structure.</div>
</td><td class="summaryTableOwnerCol">AbstractSortedCollection</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#remove()">remove</a>(item:*):Boolean</div>
<div class="summaryTableDescription">
   
   Removes an item from the collection.</div>
</td><td class="summaryTableOwnerCol">AbstractSortedCollection</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#removeFirst()">removeFirst</a>():*</div>
<div class="summaryTableDescription">
   
   Removes the first item of the ordered collection.</div>
</td><td class="summaryTableOwnerCol">AbstractSortedCollection</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#removeLast()">removeLast</a>():*</div>
<div class="summaryTableDescription">
   
   Removes the last item of the ordered collection.</div>
</td><td class="summaryTableOwnerCol">AbstractSortedCollection</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#toArray()">toArray</a>():Array</div>
<div class="summaryTableDescription">
   
   Returns an array of all items.</div>
</td><td class="summaryTableOwnerCol">AbstractSortedCollection</td>
</tr>
</table>
</div>
<a name="protectedMethodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Protected Methods</div>
<table id="summaryTableProtectedMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#addNode()">addNode</a>(newNode:<a href="SortedNode.html">SortedNode</a>):void</div>
<div class="summaryTableDescription">
   Adds an item to the tree.</div>
</td><td class="summaryTableOwnerCol">AbstractSortedCollection</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#firstEqualNode()">firstEqualNode</a>(item:*):<a href="../core/SortedNode.html">SortedNode</a>
</div>
<div class="summaryTableDescription">
   Returns the first node whose item equals the given item.</div>
</td><td class="summaryTableOwnerCol">AbstractSortedCollection</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#higherNode()">higherNode</a>(item:*):<a href="../core/SortedNode.html">SortedNode</a>
</div>
<div class="summaryTableDescription">
   Returns the first node whose item is higher than the given item.</div>
</td><td class="summaryTableOwnerCol">AbstractSortedCollection</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#lesserNode()">lesserNode</a>(item:*):<a href="../core/SortedNode.html">SortedNode</a>
</div>
<div class="summaryTableDescription">
   Returns the last node whose item is lesser than the given item.</div>
</td><td class="summaryTableOwnerCol">AbstractSortedCollection</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#removeNode()">removeNode</a>(node:<a href="SortedNode.html">SortedNode</a>):void</div>
<div class="summaryTableDescription">
   Removes a node from the tree.</div>
</td><td class="summaryTableOwnerCol">AbstractSortedCollection</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#rotate()">rotate</a>(parent:<a href="SortedNode.html">SortedNode</a>, child:<a href="SortedNode.html">SortedNode</a>):void</div>
<div class="summaryTableDescription">
   Rotates a parent with its child node.</div>
</td><td class="summaryTableOwnerCol">AbstractSortedCollection</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="_comparator"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">_comparator</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>protected var _comparator:<a href="../../framework/IComparator.html">IComparator</a></code><p>
   The sort criterion.
   </p></div>
<a name="comparator"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">comparator</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>comparator:<a href="../../framework/IComparator.html">IComparator</a></code>&nbsp;&nbsp;[read-write]<p>
   
   Returns or sets the initial comparator of the collection.
   
   </p><p>You cannot reset a comparator of a collection that contains items.
   In that case an <code>ArgumentError</code> is thrown.</p>
   
   <span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get comparator():<a href="../../framework/IComparator.html">IComparator</a></code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set comparator(value:<a href="../../framework/IComparator.html">IComparator</a>):void</code>
<br>
</div>
<a name="first"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">first</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>first:*</code>&nbsp;&nbsp;[read-only]<p>
   
   The first item or <code>undefined</code> if the collection is empty.
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get first():*</code>
<br>
</div>
<a name="last"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">last</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>last:*</code>&nbsp;&nbsp;[read-only]<p>
   
   The last item or <code>undefined</code> if the collection is empty.
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get last():*</code>
<br>
</div>
<a name="_root"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">_root</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>protected var _root:<a href="../core/SortedNode.html">SortedNode</a></code><p>
   The root node.
   </p></div>
<a name="_size"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">_size</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>protected var _size:uint = 0</code><p>
   The size of the collection.
   </p></div>
<a name="size"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">size</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>size:uint</code>&nbsp;&nbsp;[read-only]<p>
   
   The number of items contained by the collection.
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get size():uint</code>
<br>
</div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="AbstractSortedCollection()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">AbstractSortedCollection</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function AbstractSortedCollection(comparator:<a href="../IComparator.html">IComparator</a> = null)</code><p>
   AbstractSortedCollection constructor.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">comparator</span>:<a href="../IComparator.html">IComparator</a></code> (default = <code>null</code>)<code></code> &mdash; The sort criterion.
   </td>
</tr>
</table>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="addNode()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">addNode</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>protected function addNode(newNode:<a href="SortedNode.html">SortedNode</a>):void</code><p>
   Adds an item to the tree.
   
   </p><p>The method creates a new tree node, inserts the node as the leaf of
   its successor/predecessor and rotates then the node upwards until
   the tree becomes consistent again regarding the priority constraint.</p>
   
   <p>If the tree is empty, the method simply creates a new root node.</p>
   
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">newNode</span>:<a href="SortedNode.html">SortedNode</a></code> &mdash; The node to add.
   </td>
</tr>
</table>
</div>
<a name="clear()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">clear</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function clear():Boolean</code><p>
   
   Removes all items from the collection.
   
   </p><p>If the collection is already empty, the method aborts with <code>false</code>.</p>
   
   <p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; <code>true</code> if items have been removed.
   </td>
</tr>
</table>
</div>
<a name="firstEqualNode()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">firstEqualNode</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>protected function firstEqualNode(item:*):<a href="../core/SortedNode.html">SortedNode</a></code><p>
   Returns the first node whose item equals the given item.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">item</span>:*</code> &mdash; The item to test.
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../core/SortedNode.html">SortedNode</a></code> &mdash; 
                        The first equal node or <code>undefined</code> if there is no equal item contained.
   
                        
                     </td>
</tr>
</table>
</div>
<a name="has()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">has</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function has(item:*):Boolean</code><p>
   
   Tests if an item is contained by the collection.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">item</span>:*</code> &mdash; The item to test.
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; <code>true</code> if the item is contained.
   </td>
</tr>
</table>
</div>
<a name="hasEqual()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">hasEqual</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function hasEqual(item:*):Boolean</code><p>
   
   Tests if the collection contains an item that is equal to the given item.
   
   </p><p>Returns of course <code>true</code> if the given item is contained.</p>
   
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">item</span>:*</code> &mdash; The item to test.
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; <code>true</code> if there is an equal item contained.
   </td>
</tr>
</table>
</div>
<a name="higherNode()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">higherNode</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>protected function higherNode(item:*):<a href="../core/SortedNode.html">SortedNode</a></code><p>
   Returns the first node whose item is higher than the given item.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">item</span>:*</code> &mdash; The item to test.
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../core/SortedNode.html">SortedNode</a></code> &mdash; 
                        The next higher node or <code>null</code> if there is no higher item.
   
                        
                     </td>
</tr>
</table>
</div>
<a name="iterator()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">iterator</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function iterator(cursor:*):<a href="../../framework/IIterator.html">IIterator</a></code><p>
   
   Returns an iterator over the iterable data structure.
   
   </p><p>The <code>cursor</code> parameter is optional and not considered by all iterable
   data structures. E.g. the iterator of an unordered collection such as <code>Map</code>
   or <code>Set</code> starts always with the first item found. Still passing a parameter to
   such a data structure does not throw an error and will simply show no effect.</p>
   
   <p>The type of the cursor is unspecified and depends on the particular data structure.
   E.g. lists allow to specify an index, sets to specify an item and maps to specify a key.</p>
   
   <p>If <code>cursor</code> is specified, the iterator returns the item that is related
   to that cursor with the first call to <code>next()</code> (and its predecessor with
   the first call to <code>previous()</code> if the iterator allows bidirectional
   navigation.</p>
   
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">cursor</span>:*</code> &mdash; The initial cursor position.
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../../framework/IIterator.html">IIterator</a></code> &mdash; 
                        An iterator.
   
                        
                     </td>
</tr>
</table>
</div>
<a name="lesserNode()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">lesserNode</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>protected function lesserNode(item:*):<a href="../core/SortedNode.html">SortedNode</a></code><p>
   Returns the last node whose item is lesser than the given item.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">item</span>:*</code> &mdash; The item to test.
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../core/SortedNode.html">SortedNode</a></code> &mdash; 
                        The last lesser node or <code>null</code> if there is no lesser item.
   
                        
                     </td>
</tr>
</table>
</div>
<a name="mostLeftNode_internal()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">mostLeftNode_internal</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>as3commons_collections function mostLeftNode_internal(node:<a href="SortedNode.html">SortedNode</a> = null):<a href="../core/SortedNode.html">SortedNode</a></code><p>
   Framework internal method to retrieve the lowest node of the given subtree (node).
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">node</span>:<a href="SortedNode.html">SortedNode</a></code> (default = <code>null</code>)<code></code> &mdash; The root node of the subtree.
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../core/SortedNode.html">SortedNode</a></code> &mdash; 
                        The lowest node or <code>null</code>, if the collection is empty.
   
                        
                     </td>
</tr>
</table>
</div>
<a name="mostRightNode_internal()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">mostRightNode_internal</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>as3commons_collections function mostRightNode_internal(node:<a href="SortedNode.html">SortedNode</a> = null):<a href="../core/SortedNode.html">SortedNode</a></code><p>
   Framework internal method to retrieve the highest node of the given subtree (node).
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">node</span>:<a href="SortedNode.html">SortedNode</a></code> (default = <code>null</code>)<code></code> &mdash; The root node of the subtree.
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../core/SortedNode.html">SortedNode</a></code> &mdash; 
                        The highest node or <code>null</code>, if the collection is empty.
   
                        
                     </td>
</tr>
</table>
</div>
<a name="nextNode_internal()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">nextNode_internal</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>as3commons_collections function nextNode_internal(node:<a href="SortedNode.html">SortedNode</a>):<a href="../core/SortedNode.html">SortedNode</a></code><p>
   Framework internal method to retrieve the successor of a given node.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">node</span>:<a href="SortedNode.html">SortedNode</a></code> &mdash; The node to get the successor.
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../core/SortedNode.html">SortedNode</a></code> &mdash; 
                        The next node or <code>null</code> if the node is the first item or the collection is empty.
   
                        
                     </td>
</tr>
</table>
</div>
<a name="previousNode_internal()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">previousNode_internal</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>as3commons_collections function previousNode_internal(node:<a href="SortedNode.html">SortedNode</a>):<a href="../core/SortedNode.html">SortedNode</a></code><p>
   Framework internal method to retrieve the predecessor of a given node.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">node</span>:<a href="SortedNode.html">SortedNode</a></code> &mdash; The node to get the predecessor.
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../core/SortedNode.html">SortedNode</a></code> &mdash; 
                        The previous node or <code>null</code> if the node is the last node or the collection is empty.
   
                        
                     </td>
</tr>
</table>
</div>
<a name="remove()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">remove</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function remove(item:*):Boolean</code><p>
   
   Removes an item from the collection.
   
   </p><p>Trying to remove an item which is not contained by the collection
   leaves the collection untouched and returns <code>false</code>.</p>
   
   <p>If the collection contains multiple entries of the given item
   the first occurrence of the item will be removed.</p>
   
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">item</span>:*</code> &mdash; The item to remove.
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; <code>true</code> if the item has been removed.
   </td>
</tr>
</table>
</div>
<a name="removeFirst()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">removeFirst</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function removeFirst():*</code><p>
   
   Removes the first item of the ordered collection.
   
   </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>*</code> &mdash; The formerly first item or <code>undefined</code> if the collection is empty.
   </td>
</tr>
</table>
</div>
<a name="removeLast()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">removeLast</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function removeLast():*</code><p>
   
   Removes the last item of the ordered collection.
   
   </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>*</code> &mdash; The formerly last item or <code>undefined</code> if the collection is empty.
   </td>
</tr>
</table>
</div>
<a name="removeNode()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">removeNode</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>protected function removeNode(node:<a href="SortedNode.html">SortedNode</a>):void</code><p>
   Removes a node from the tree.
   
   </p><p>The method rotates the given node downwards until it becomes a leaf node
   and gets removed from the tree.</p>
   
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">node</span>:<a href="SortedNode.html">SortedNode</a></code> &mdash; The node to remove.
   </td>
</tr>
</table>
</div>
<a name="removeNode_internal()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">removeNode_internal</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>as3commons_collections function removeNode_internal(node:<a href="SortedNode.html">SortedNode</a>):void</code><p>
   Framework internal method to remove a node from the collection.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">node</span>:<a href="SortedNode.html">SortedNode</a></code> &mdash; The node to remove.
   </td>
</tr>
</table>
</div>
<a name="rotate()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">rotate</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>protected function rotate(parent:<a href="SortedNode.html">SortedNode</a>, child:<a href="SortedNode.html">SortedNode</a>):void</code><p>
   Rotates a parent with its child node.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">parent</span>:<a href="SortedNode.html">SortedNode</a></code> &mdash; The parent node.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">child</span>:<a href="SortedNode.html">SortedNode</a></code> &mdash; The child node.
   </td>
</tr>
</table>
</div>
<a name="toArray()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">toArray</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function toArray():Array</code><p>
   
   Returns an array of all items.
   
   </p><p>The order of items in the array is the same as in the particular collection.</p>
   
   <p>Certain collections do not have an explicit order (<code>Map</code>, <code>Set</code>).
   The order of the items in the array is then not predictable.</p>  
   
   <p>If the collection maintains an array as its data source, a copy
   of the internal array is returned rather than the original array.</p>
   
   <p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Array</code> &mdash; An array of the items of the collection.
   </td>
</tr>
</table>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
